/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pixelprocessing;

import core.Filter;
import filters.BlueBandExtractor;
import filters.GreenBandExtractor;
import filters.RedBandExtractor;
import java.awt.image.BufferedImage;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import utils.ImageLoader;

/**
 *
 * @author fuanka
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        ImageLoader l=new ImageLoader();
        BufferedImage bi=l.loadImageFromURL("/home/fuanka/sample.jpeg");

        Filter d= new BlueBandExtractor();
        d.push((Object)bi);

        BufferedImage biResult=(BufferedImage)d.pull();

        JFrame frame=new JFrame();
        JLabel label = new JLabel(new ImageIcon(biResult));
        frame.getContentPane().add(label);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setVisible(true);
    }

}
